local skel = fk.CreateSkill{
  name = "mahjong_add_and_cancel_sign"
}

Fk:loadTranslationTable{
  ["mahjong_add_and_cancel_sign"] = "吃碰杠",
}

skel:addEffect("active",  {
  mute = true,
  interaction = function (self, player)
    return UI.ComboBox{
      choices = {"@@Chow", "@@Pung", "@@Kong", "@@Kong-Hide"}
    }
  end,
  card_filter = function (self, player, to_select, selected, selected_targets)
    return true
  end,
  target_filter = Util.FalseFunc,
  feasible = Util.TrueFunc,
  can_use = function (self, player)
    return true
  end,
  on_use = function (self, room, effect)
    for _, cid in ipairs(effect.cards) do
      local c = Fk:getCardById(cid)
      if c:getMark(self.interaction.data) > 0 then
        room:setCardMark(c, self.interaction.data, 0)
      else
        room:setCardMark(c, self.interaction.data, 1)
      end
    end
    room:addPlayerMark(effect.from, "next_comp_index", 1)
  end
})

return skel
